home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
asmutil
/
d86v322.zip
/
D06.DOC
< prev
next >
Wrap
Text File
|
1989-12-15
|
20KB
|
434 lines
CHAPTER 6 MEMORY DISPLAY OPTIONS
Memory Display Windows
The debugger allows you to set up windows into your program
memory space. Using these windows, you can view memory in a
variety of formats. The windows will remain in effect until you
cancel them; updating themselves automatically if the memory
changes.
There are six single-line memory windows always present, in the
lower right portion of the screen. In addition, you can have the
upper-right window display a 14-line page of memory values.
Single-Line Memory Windows
A single-line memory window line consists of a specification,
typed in by you, followed by a display, supplied by the debugger.
To type in a specification on any one of window lines 1 through
6, simply type the associated digit, 1 through 6, when the
debugger is in its main command mode. The cursor will jump to
the beginning of the memory-window line you are specifying. You
then type in a display format specification, followed by the
address of memory you want displayed.
The simplest form of the display format specification is a single
letter, signifying one of the display types available. The
choices are:
B for hexadecimal bytes
W for hexadecimal words
N for decimal bytes
D for decimal words
Q for octal bytes
O for octal words
T for text; each byte reduced to one ASCII display
character
A for ASCII text, each byte occupying 2 display
characters (the exact display is spelled out later
in this chapter)
C for ASCII characters, occupying 2 bytes if needed,
otherwise one
A format specification of one of the above letters will cause the
debugger to display the array of bytes starting at the address
you specify, in the format indicated by the letter, as long as
there is room on the line. All letters in a format specification
(or in any other context in the debugger) can be typed in either
upper or lower case.
6-2
The format specification should be terminated by a comma. After
the comma (and an optional space), you type the address of memory
you want displayed. This consists of two values, the segment
followed by the offset. The values should be separated by a
comma. You can omit the segment value if you wish: in that case,
the current value of DS is used. The debugger reminds you that
you have specified this option by following what you type with 2
commas instead of one.
The value you type can take one of the following forms:
a. a numeric constant, whose format is just as in the assembly
language (leading zero means default hex, otherwise default
decimal)
b. a register name (IP is now accepted as a register name)
c. a user symbol from the assembly language program being
debugged.
After you type the address specification, you hit the ENTER key,
and the debugger fills out the rest of the line with the memory
display.
For example, if you want to display hex bytes starting at 01000
hex on display line 2, you type 2b,01000<ENTER>. The cursor jumps
to the line immediately when you type the 2, and it displays the
b,01000 on the line as you type it. The b says you want hex
bytes, and the 01000 has a leading zero to signify a hexadecimal
address, not decimal. When you press the ENTER key, the debugger
displays two commas, followed by the hex bytes. If the memory is
zeroed, you will see 00 00 00 00 00 etc. to the end of the
display line.
Erasing Memory Display Lines
Any memory display window that you specify will remain in effect,
always updated to show the latest memory contents, until you
explicitly erase it. To erase a window, you type the number of
the window, followed by a blank. The line will also be erased if
you start typing a format specification, and you hit the ENTER
key before you get to your address specification.
In the coming sections, many of the examples assume (and they say
so) that your display is blank before you type in the example.
You can always get a blank display by typing in each number
followed by a blank: "1 2 3 4 5 6 ".
If you accidentally type a digit and DON'T want to erase the line
your cursor has jumped to, press the ESC key to return to the
main command mode.
6-3
Continuation Lines
You may continue a memory display window onto the next line, by
placing a double quote mark " at the beginning of the next line.
You may do this in one of two ways: you may type the number of
the next line, followed by the double quote mark; or you may
simply type the double quote mark at the command level. The
first method allows you to specify which window line you want
continued, if there is more than one. The second method is more
convenient to use. It places the quote mark on the last blank
line that immediately follows a non-blank line.
You may continue placing " marks on as many lines as you have,
creating a multi-line display.
The debugger follows the " mark with the address of memory being
displayed, followed by the memory, according to the start of the
type specification of the line being continued. The memory
display is aligned with the display of above line.
If you are creating a multi-line display, and your specification
is a long one, you may wish to start the display at the beginning
of the next line, rather than after the specification on the
first line. This will often give you more room. You do this by
terminating the format specification with a slash / instead of a
comma. For example, to display many hex bytes at the array
BYTE_ARRAY, type 1b/byte_array<ENTER> followed by five double
quote marks, when the memory display is empty.
Mixed Format Specification
Instead of having all your bytes or words on a line displayed in
the same format, you can mix your formats. You do this by
providing more than one letter in your format specification. The
debugger will display one memory unit for each letter-type you
specify. The line will be filled out with the last type given.
For example, if you type 3nwb,01000<ENTER>, you will get a
display on memory line 3 of the decimal byte at 01000, the hex
word at 01001, and an array of hex bytes starting at 01003.
Numbers in a Format Specification
You may precede any letter in a format specification with a
number up to 255. The effect is the same as if you had repeated
the letter the given number of times. For example, if you type 1
to go to memory line 1, followed by 4w10tb,02000<ENTER>, you will
get 4 hex words at 02000, 10 text characters at 02008, and an
array of hex bytes from 02012 filling out the rest of the line.
6-4
You may also end your format specification with a number up to
255. This will cause the entire specification to be repeated the
given number of times. If there is room on the line for the full
number given, the display will stop there-- there will be no
repeating of the last type byte. If there is not room on the
line for the full number of global iterations, the debugger will
stop at the end of the last iteration that would fit. For
example, the specification b8 causes 8 hex bytes to be displayed,
and the remainder of the display line to be blank. The
specification b3w9 will cause the debugger to try to output 9
records, each consisting of a hex byte followed by 3 hex words.
After putting out 2 such records, the debugger will see that
there is not room for a third full record, so it will stop. This
stopping at the record boundary allows you to continue the
display, with correct alignment, on subsequent lines.
Spacing Between Memory Display Units
In general, the debugger provides a space between each unit (byte
or word) it displays. There is an exception, however: the
debugger will not space between adjacent text characters (A,C, or
T specifications).
There are special specifiers G, J, and M, described in the
sect